import { IsNotEmpty, Matches, Length, Allow } from 'class-validator';
import { IsExistsRule } from '../rules/is-ExistsRule.rule';
import { ApiProperty } from '@nestjs/swagger';
export class UpdateAuthDto {
  @IsNotEmpty({ message: '用户名不能为空' })
  @IsExistsRule('user', { message: '用户名不存在' })
  @ApiProperty({ example: 'admins', description: '用户名' })
  userName: string;
  @IsNotEmpty({ message: '密码不能为空' })
  @ApiProperty({ example: 'admin888', description: '密码' })
  passWord: string;
  @Allow()
  @ApiProperty({ example: '请输入您的验证码' })
  captcha: Object;
}
